<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 147 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts147p0{position:absolute;left:106px;top:97px;}
 .ts147p1{position:absolute;left:352px;top:97px;}
 .ts147p3{position:absolute;left:665px;top:97px;}
 .ts147p7{position:absolute;left:106px;top:113px;}
 .ts147p8{position:absolute;left:706px;top:1026px;}
 .ts147p9{position:absolute;left:331px;top:1044px;}
 .ts147p13{position:absolute;left:106px;top:146px;}
 .ts147p14{position:absolute;left:106px;top:164px;}
 .ts147p15{position:absolute;left:106px;top:183px;}
 .ts147p16{position:absolute;left:106px;top:201px;}
 .ts147p18{position:absolute;left:106px;top:220px;}
 .ts147p21{position:absolute;left:106px;top:238px;}
 .ts147p23{position:absolute;left:106px;top:256px;}
 .ts147p26{position:absolute;left:106px;top:275px;}
 .ts147p27{position:absolute;left:106px;top:293px;}
 .ts147p28{position:absolute;left:106px;top:312px;}
 .ts147p29{position:absolute;left:106px;top:330px;}
 .ts147p31{position:absolute;left:106px;top:348px;}
 .ts147p33{position:absolute;left:106px;top:367px;}
 .ts147p34{position:absolute;left:106px;top:386px;}
 .ts147p36{position:absolute;left:106px;top:404px;}
 .ts147p37{position:absolute;left:106px;top:422px;}
 .ts147p39{position:absolute;left:106px;top:441px;}
 .ts147p41{position:absolute;left:106px;top:459px;}
 .ts147p42{position:absolute;left:106px;top:477px;}
 .ts147p44{position:absolute;left:106px;top:495px;}
 .ts147p47{position:absolute;left:106px;top:513px;}
 .ts147p49{position:absolute;left:106px;top:531px;}
 .ts147p51{position:absolute;left:106px;top:549px;}
 .ts147p53{position:absolute;left:106px;top:567px;}
 .ts147p55{position:absolute;left:106px;top:586px;}
 .ts147p57{position:absolute;left:106px;top:604px;}
 .ts147p59{position:absolute;left:106px;top:622px;}
 .ts147p61{position:absolute;left:106px;top:640px;}
 .ts147p63{position:absolute;left:106px;top:658px;}
 .ts147p66{position:absolute;left:106px;top:676px;}
 .ts147p68{position:absolute;left:106px;top:694px;}
 .ts147p69{position:absolute;left:106px;top:712px;}
 .ts147p71{position:absolute;left:106px;top:731px;}
 .ts147p72{position:absolute;left:106px;top:749px;}
 .ts147p74{position:absolute;left:106px;top:768px;}
 .ts147p75{position:absolute;left:106px;top:787px;}
 .ts147p77{position:absolute;left:106px;top:805px;}
 .ts147p78{position:absolute;left:106px;top:823px;}
 .ts147p80{position:absolute;left:106px;top:841px;}
 .ts147p82{position:absolute;left:106px;top:860px;}
 .ts147p83{position:absolute;left:106px;top:878px;}
 .ts147p85{position:absolute;left:106px;top:896px;}
 .ts147p86{position:absolute;left:106px;top:915px;}
 .ts147p88{position:absolute;left:106px;top:933px;}
 .ts147p90{position:absolute;left:106px;top:951px;}
 .ts147p91{position:absolute;left:106px;top:971px;}
 .ts147p93{position:absolute;left:106px;top:989px;}

 /* Font Styles */
 .ft0p147{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p147{font-weight:normal;}
 .ft2p147{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p147{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p147{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p147{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}
 .ft6p147{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}

 /* Background Style */
 .styleBackground147{position:absolute;left:97px;top:384px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index146.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;147 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index148.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground147><img src="./background147.png" width="633" height="671" border="0" alt=""></div>
<div class=ts147p0><span class="ft0p147"> </span></div>
<div class=ts147p1><span class="ft0p147">Gravitybox Schedule Primer<span class="ft1p147"> </span></span></div>
<div class=ts147p3><span class="ft0p147">Page 145&nbsp; </span></div>
<div class=ts147p7><span class="ft2p147"> </span></div>
<div class=ts147p8><span class="ft3p147"> </span></div>
<div class=ts147p9><span class="ft4p147">1998&#45;2004 Gravitybox Software LLC<span class="ft3p147"> </span></span></div>
<div class=ts147p13><span class="ft5p147"> </span></div>
<div class=ts147p14><span class="ft5p147">Now that the child form has been constructed we need a way to open these forms as </span></div>
<div class=ts147p15><span class="ft5p147">well as a container in which to contain them. So we need to build an MDI parent form. </span></div>
<div class=ts147p16><span class="ft5p147">We add one to our project and start by declaring the menus. Open the menu editor and </span></div>
<div class=ts147p18><span class="ft5p147">add a top&#45;level menu. We will set the caption to &#147;File&#148; and name it &#147;mnuFile&#148;. Under this </span></div>
<div class=ts147p21><span class="ft5p147">menu will add the following menus: Open, Close, Save, Print, and&nbsp; </span></div>
<div class=ts147p23><span class="ft5p147">Exit. This will provide us with the needed functionality to use this program. </span></div>
<div class=ts147p26><span class="ft5p147"> </span></div>
<div class=ts147p27><span class="ft5p147">The open menu item will prompt the user for a date and if the date has not been loaded </span></div>
<div class=ts147p28><span class="ft5p147">previously, it will load a child form and have it open the saved file. If the file does not </span></div>
<div class=ts147p29><span class="ft5p147">exist it will load a blank schedule, remember? The GetDate function is defined later; just </span></div>
<div class=ts147p31><span class="ft5p147">assume that it will return a date to open. </span></div>
<div class=ts147p33><span class="ft5p147"> </span></div>
<div class=ts147p34><span class="ft6p147">Private Sub mnuFileOpen_Click() </span></div>
<div class=ts147p36><span class="ft6p147"> </span></div>
<div class=ts147p37><span class="ft6p147">Dim F As frmChild </span></div>
<div class=ts147p39><span class="ft6p147">Dim dtDate As Date </span></div>
<div class=ts147p41><span class="ft6p147"> </span></div>
<div class=ts147p42><span class="ft6p147">&nbsp; 'Get a date from the user If valid then </span></div>
<div class=ts147p44><span class="ft6p147">&nbsp; 'open a child window and load this date </span></div>
<div class=ts147p47><span class="ft6p147">&nbsp; If GetDate(dtDate) Then </span></div>
<div class=ts147p49><span class="ft6p147">&nbsp;&nbsp;&nbsp; If IsDateLoaded(dtDate) Then </span></div>
<div class=ts147p51><span class="ft6p147">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call MsgBox(&#34;This date is already loaded!&#34;, bExclamation) </span></div>
<div class=ts147p53><span class="ft6p147">&nbsp;&nbsp;&nbsp; Else </span></div>
<div class=ts147p55><span class="ft6p147">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set F = New frmChild </span></div>
<div class=ts147p57><span class="ft6p147">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call F.OpenFile(dtDate) </span></div>
<div class=ts147p59><span class="ft6p147">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call F.Show </span></div>
<div class=ts147p61><span class="ft6p147">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call UpdateMenu </span></div>
<div class=ts147p63><span class="ft6p147">&nbsp;&nbsp;&nbsp; End If </span></div>
<div class=ts147p66><span class="ft6p147">&nbsp; End If </span></div>
<div class=ts147p68><span class="ft6p147"> </span></div>
<div class=ts147p69><span class="ft6p147">End Sub </span></div>
<div class=ts147p71><span class="ft5p147"> </span></div>
<div class=ts147p72><span class="ft5p147">The Close menu item will do nothing more than close the active form. </span></div>
<div class=ts147p74><span class="ft5p147"> </span></div>
<div class=ts147p75><span class="ft6p147">Private Sub mnuFileClose_Click() </span></div>
<div class=ts147p77><span class="ft6p147"> </span></div>
<div class=ts147p78><span class="ft6p147">&nbsp; Unload Me.ActiveForm </span></div>
<div class=ts147p80><span class="ft6p147">&nbsp; Call UpdateMenu </span></div>
<div class=ts147p82><span class="ft6p147"> </span></div>
<div class=ts147p83><span class="ft6p147">End Sub </span></div>
<div class=ts147p85><span class="ft5p147"> </span></div>
<div class=ts147p86><span class="ft5p147">The Save menu item will call the SaveFile method of the child form. Each child knows </span></div>
<div class=ts147p88><span class="ft5p147">how to save itself. </span></div>
<div class=ts147p90><span class="ft5p147"> </span></div>
<div class=ts147p91><span class="ft6p147">Private Sub mnuFileSave_Click() </span></div>
<div class=ts147p93><span class="ft6p147">&nbsp; Call Me.ActiveForm.SaveFile </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
